package com.eastjet.equipment.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastjet.equipment.service.DeviceUserService;
import com.eastjet.maintenance.domain.DevicePmts;
import com.eastjet.maintenance.domain.DeviceUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/user")
public class DeviceUserController {
    @Autowired
    private DeviceUserService deviceUserService;
    @GetMapping("/userlist")
    public Page<DeviceUser> getUserList(@RequestParam(defaultValue = "1") int page,
                                        @RequestParam(defaultValue = "2") int size,
                                        @RequestParam(defaultValue ="") String condition
    ) {
        System.out.println("condition:" + condition);
        System.out.println("page:"+page);
        return  deviceUserService.getUserList(page, size, condition);
    }
}
